<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }

        .container {
            width: 80%;
            max-width: 400px;
            margin: 50px auto;
            padding: 20px;
            background: #fff;
            border: 1px solid #ddd;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        header {
            background: #333;
            color: #fff;
            padding: 20px;
            text-align: center;
        }

        form {
            margin-top: 20px;
        }

        form label {
            display: block;
            margin-bottom: 5px;
        }

        form input[type="text"],
        form input[type="password"],
        form input[type="text"] {
            width: calc(100% - 20px);
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ddd;
        }

        form input[type="button"] {
            width: 90%;
            padding: 10px 20px;
            background: #333;
            color: #fff;
            border: none;
            cursor: pointer;
        }

        form input[type="button"]:hover {
            background: #444;
        }

        .captcha {
            margin-bottom: 10px;
            text-align: center;
        }

        .captcha img {
            border: 1px solid #ddd;
            width: 100px;
            height: 40px;
        }

        .forgot-password {
            text-align: center;
            margin-top: 10px;
        }

        footer {
            background: #333;
            color: #fff;
            text-align: center;
            padding: 10px 0;
            position: relative;
            bottom: 0;
            width: 100%;
        }

        #captcha {
            cursor: pointer;
        }
    </style>
</head>

<body>
    <header>
        <h1>用户登录</h1>
    </header>
    <div class="container">
        <form>
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" required>

            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required>

            <div class="captcha">
                <label for="captcha">验证码：</label>
                <img id="captcha" src="./img/captcha.png" alt="验证码">
            </div>
            <input type="text" id="captcha_code" name="captcha" placeholder="输入验证码" required>

            <div class="forgot-password">
                <a href="forgot-password.html">忘记密码？</a>
            </div>

            <input type="button" value="登录" class="login">

            <p>没有有账户? <a href="register.html">注册</a></p>
        </form>
    </div>
    <footer>
        <p>版权所有 © 2024 新闻网站</p>
    </footer>
</body>
</html>